<?php
include_once('global.php');
if($action->_islogin())					//检测是否判断
{
	header('Location:login.php');
	exit();
}

if(isset($_GET['action']) && $_GET['action'] == 'back')		//已还图书页面
{
	$mark = 2;
	$title = '借阅管理&gt;&gt;<font color="#00CC00">过期图书</font>';
	$total = $book->_get_guoqi_num();			//读取已还图书记录数量
	//读取一页已还图书
	$books = $book->_get_guoqi();
	pageft($total, DISPLAY, 1, 1, 1, 5);	//分页
}
else if(isset($_GET['action']) && $_GET['action'] == 'find')	//查询用户的借书境况
{
	$mark = 1;
	$user = $member->_read_a_member($_GET['uid']);
	$title = '借阅管理>>&nbsp;' . $user['username'] . '&nbsp;<font color="#CC3300">的借阅</font>';
	$books = $book->bo_users($_GET['uid']);
	$nonav = 1;	//取消分页
}
else
{
	$mark = 1;
	$title = '借阅管理&gt;&gt;<font color="#CC3300">借出图书</font>';
	$total = $book->bo_allnum();			//读取记录数量
	//读取一页借出图书
	$books = $book->bo_all();
	pageft($total, DISPLAY, 1, 1, 1, 5);	//分页
}
include('templates/borrow_book_main.html');
?>